
[#include "single/layout/layout02/layout.ftl"/]
[@htmlHead]

[/@htmlHead]

[@htmlBody]
<div class="row">
    <div class="col-xs-12">
        <ul class="nav nav-tabs ">
            <li >
                <a href="${base}/rule/view/index">
                    数据列表
                </a>
            </li>
            [#if "add"==operateType]
                <li class="active"><a href="javascript:void(0)">数据增加</a></li>
            [#else ]
                <li class="active"><a href="javascript:void(0)">数据编辑</a></li>
            [/#if]

        </ul>
    </div>
</div>
<div class="row">
    <div class="col-xs-12 ">

        <form class="form-horizontal" action="${base}/rule/view/update" method="post" id="editForm">
            <input type="hidden" name="id" id="id" value="${rule.id}"/>
            <div class="form-group">
                <label class="col-xs-10 col-sm-4 control-label"><span class="required">*</span>名称:</label>

                <div class="col-xs-10 col-sm-4  ">
                    <input  name="name" value="${rule.name}" placeholder="名称"
                           class="form-control "/>

                </div>
            </div>

            <div id="editAlert" class="" style="min-width:550px"></div>
            <div class="form-group">
                <label class="col-xs-10 col-sm-4 control-label"><span class="required">*</span>编码:</label>

                <div class="col-xs-10 col-sm-4  ">
                    <input  name="code" value="${rule.code}" placeholder="编码"
                            class="form-control " maxlength="8"/>
                </div>
            </div>

            <div class="form-group">
                <label class="col-xs-10 col-sm-4 control-label "><span class="required">*</span>表达式:</label>

                <div class="col-xs-10 col-sm-4  ">
                    <input  name="expression" value="${rule.expression}" placeholder="expression"
                            class="form-control input-large"/>

                </div>
            </div>


            <div class="form-group">
                <label class="col-xs-10 col-sm-4 control-label">描述</label>

                <div class="col-xs-10 col-sm-4  ">
                    <textarea class="form-control input-large" name="description"
                              style="text-align: left;">${rule.description}</textarea>
                </div>
            </div>

            <div class="form-group">
                <label class=" col-xs-10 col-sm-4  control-label"></label>
                <div class="col-xs-10 col-sm-4 " align="center">
                    <input type="button" class="btn btn-info btn-sm" value="确定" onclick="doSubmit('${operateType}')"/>
                    <input type="button" onclick="tools.goto('${base}/rule/view/index')" class="btn btn-cancle btn-sm" value="返回"/>
                </div>
            </div>
        </form>

    </div>
</div>
[/@htmlBody]

[@htmlFoot]
    [#include "common/validate.ftl"/]
<script src="${jpath}/assets/public/plugins/dialog/bootbox.js" type="text/javascript"></script>
<script src="${base}/plugins/single/js/module/rule/rule.js" type="text/javascript"></script>

[/@htmlFoot]